//
//  SceneryCell.m
//  OnePiece
//
//  Created by lanou on 15/10/29.
//  Copyright © 2015年 wsy. All rights reserved.
//

#import "SceneryCell.h"

@implementation SceneryCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _coverView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 30, SCREEN_WIDTH-40, 140)];
        _describeLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, 170, SCREEN_WIDTH-60, 40)];
        _describeLabel.textColor = [UIColor grayColor];
        _describeLabel.font = [UIFont systemFontOfSize:12];
        _describeLabel.numberOfLines = 2;
        
        
        
        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 30)];
        _nameLabel.textAlignment = NSTextAlignmentCenter;
        _nameLabel.textColor = [UIColor grayColor];
        
        [self.contentView addSubview:_nameLabel];
        [self.contentView addSubview:_coverView];
        [self.contentView addSubview:_describeLabel];
    }
    return self;
}

- (void)setConfigureModel:(CountrySceneryModel *)configureModel
{
    [_coverView sd_setImageWithURL:[NSURL URLWithString:configureModel.cover_route_map_cover]];
    _nameLabel.text = configureModel.name;
    _describeLabel.text = configureModel.describe;
    
}









- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
